home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1990: Discy Business / Discy Business.2mg / DEV.CD / TOOLS / TECH.NOTES / IIGS / TN.IIGS.043 < prev    next >
Encoding:
Text File  |  1988-11-20  |  1.7 KB  |  45 lines  |  [04] ASCII Text (0x0000)

  1. Apple II
  2. Technical Notes
  3. _____________________________________________________________________________
  4.                                                   Developer Technical Support
  5.  
  6.  
  7. Apple IIGS
  8. #43:    Undocumented Feature of CalcMenuSize
  9.  
  10. Written by:    Dan Oliver                                       November 1988
  11.  
  12. This Technical Note documents that CalcMenuSize can accept a parameter of 
  13. $FFFF to recalculate menus with uninitialized heights and widths.
  14. _____________________________________________________________________________
  15.  
  16. The newWidth and newHeight parameters of CalcMenuSize can be the actual new 
  17. width and height or zero to automatically compute the width and the height.  
  18. In addition to these two possibilities, you can also pass $FFFF in newWidth, 
  19. newHeight, or even both to tell CalcMenuSize to automatically compute the 
  20. width and height only if the current setting is zero.  Here are some examples 
  21. of how these three, previously undocumented features might be used:
  22.  
  23. Pass a New Value
  24.  
  25. Pass a new value when you need the width and height to be a specific size.
  26.  
  27. Pass $0000
  28.  
  29. Pass $0000 when you want to compute a new value regardless of the current 
  30. value.  You could compute a new value after you add or delete a new item or 
  31. change its title since the current values for width and height are set to the 
  32. current size which may be incorrect due to the change.  Passing $0000 adjusts 
  33. the menu size according to the new menu items.
  34.  
  35. Pass $FFFF
  36.  
  37. Pass $FFFF when you want to compute a new value only when the current value is 
  38. zero, as when the menu is first created.  FixMenuBar passes $FFFF to compute 
  39. sizes for only those menus with widths and heights of zero.
  40.  
  41.  
  42. Further Reference
  43. o    Apple IIGS Toolbox Reference, Volume 1
  44.  
  45.